home *** CD-ROM | disk | FTP | other *** search
/ WWW Studio 2004 / WWW Studio.iso / Serwisy / at40 / dane / banery.js < prev    next >
Encoding:
Text File  |  2004-04-09  |  984 b   |  40 lines

  1. var ilosc=3;
  2. var losowa=Math.floor(ilosc*Math.random());
  3. var link="";
  4. var baner="";
  5. var pasek="";
  6. if(losowa==0) {
  7.   link="http://www.lomsel.com.pl/";
  8.   baner="images/reklama/lomsel_400x50.gif";
  9.   pasek="Lomsel";
  10. };
  11.  
  12. if(losowa==1) {
  13.   link="http://www.konradvme.org/";
  14.   baner="images/reklama/konradvme.gif";
  15.   pasek="KonradVme";
  16. };
  17.  
  18. if(losowa==2) {
  19.   link="http://mi.com.pl/";
  20.   baner="images/reklama/mi-banner.gif";
  21.   pasek="Magazyn INTERNET";
  22. };
  23.  
  24. function high(which2){
  25. theobject=which2;
  26. highlighting=setInterval("highlightit(theobject)",50);
  27. }
  28. function low(which2){
  29. clearInterval(highlighting);
  30. which2.filters.alpha.opacity=20;
  31. }
  32.  
  33. function highlightit(cur2){
  34. if (cur2.filters.alpha.opacity<100)
  35. cur2.filters.alpha.opacity+=6;
  36. else if (window.highlighting)
  37. clearInterval(highlighting);
  38. }
  39.  
  40. document.write('<a href="'+link+'"><img style="filter:alpha(opacity=20)" onMouseover="high(this)" onMouseout="low(this)" width="400" height="50" src="'+baner+'" alt="" title="'+pasek+'"></a>');